package org.ncibi.cytoscape.metscape.multidisplay.gui.model;

import javax.swing.DefaultComboBoxModel;

@SuppressWarnings("serial")
public class ColorPickerComboBoxModel extends DefaultComboBoxModel {
	
	private final ControlInterface control;
	
	public ColorPickerComboBoxModel(ControlInterface control){
		this.control = control;
		for (ColorRange crm: ColorRange.values()){
			this.addElement(crm);
		}
		this.setSelectedItem(ColorRange.getDefault());
	}
		
	public void setSelection(ColorRange selection){
		control.colorRangeChanged(selection);
	}
}
